package priv.pfz.raft.verify.cmd;

import lombok.extern.slf4j.Slf4j;
import priv.pfz.raft.network.RpcManager;
import priv.pfz.raft.peer.ClusterHolder;
import priv.pfz.raft.peer.Peer;

import java.util.List;

/**
 * @author pengfangzhou
 * @date 2022/2/7 23:55
 */
@Slf4j
public class PauseCmd implements CmdExecutor {
    @Override
    public void execute(List<String> params) {
        for (Peer peer : ClusterHolder.peerMap.values()) {
            peer.pause();
        }
        RpcManager.pause();
        log.info("ok");
    }
}
